<?
if(strlen($ARTICLE_ID))
{
	OB_START();
	$article = new ArticleBO();
	$article->id = $ARTICLE_ID;
	$article->langID = CURRENT_LANGUAGE_ID;
	$article->Load(0,1);
	OB_END_CLEAN();
	if($article->Next())
  {
		echo okontovka_head();
		if(($article->show_title==0)){ $SHOW_TITLE = "no"; } else {$SHOW_TITLE = "yes";}
		if($SHOW_TITLE!="no")
		{
			?><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr height=25><td class="art_title" valign="top"><?=$article->name?></td></tr></table><?
		}

        if(isset($_SESSION["IS_ADM_EDIT"])AND($_SESSION["IS_ADM_EDIT"]=="123456")){
            ?><input admin="1" type="button" value="Edit article" style="top:0px; right:0px; display:block; position:relative; border: 0; z-index: 1001;" src="<?=HTTP_SERVER;?>/images/edit_button.gif" alt="Edit article" onclick="window.open('<?echo(HTTP_SERVER."/admin/main.php?edit_page=article-edit.php&articleID=".$article->id);?>','','');" border="0" ><?
        }
		?>
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr><td class="page_content"><?

		// echo "<font color=yellow>article-type=".$article->type."*</font><br />";
		// echo "<font color=yellow>article-type-view=".$article->view_type."*</font>";
		switch($article->type){
			case $article->ARTICLE_SIMPLEARTICLE: 			
                        if(isset($skip) && $skip!="")
                        {                                 
		      		$pos = strpos($article->content,"/p.php?");
		     		if ($pos === false) 
		     		{ 
		      	    	  echo article_prepare_to_display($article->content); 
			    	}else
			  	{
			          //price tag founded - skip this article
		     		}	  
		     	}else
			{ 
			  echo article_prepare_to_display($article->content);		
			}
				 
			break;
			case $article->ARTICLE_PHOTOALBUM:
				switch($article->view_type){
					case $article->VIEW_ONE_COLUMN:	include("modules/articles/album_one_column.php"); break;
					case $article->VIEW_ONE_COLUMN2:include("modules/articles/album_one_column2.php"); break;
					case $article->VIEW_ONE_IMAGE:	include("modules/articles/album_one_image.php"); break;
					default: include("modules/articles/album.php"); break;
				} // switch($article->type_view)
				break;
			case $article->ARTICLE_BANNERS: 	include("modules/articles/banners.php"); break;
		}// switch($article->type)
?>
         </td></tr>
		 </table>
<? 
	// okontovka! (footer)
	echo okontovka_footer();
    		// if you want to show not only <br><br> set HTML code into variable $SHOW_BR at your page
    	echo (isset($SHOW_BR))? $SHOW_BR: "<br><br>";
    }else // if($article->Next())
    {
    	if($SHOW_NOT_FOUND!="no"){ echo "<b>".$lang["ARTICLES_NOT_FOUND"]."</b>"; }
    }// if($article->Next())
}else
{
  if($SHOW_NOT_FOUND!="no"){ echo "*<b>".$lang["ARTICLES_NOT_FOUND"]."</b>"; }
} // if(strlen($ARTICLE_ID))
?>
